package com.prime.tutorial.moviestore.view.reports;

import com.prime.tutorial.moviestore.domain.Users;
import com.prime.tutorial.moviestore.service.reports.ReportsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;
/**
 * Provides the view level of the userActivityLast report.
 * @author vasylja
 */
@Component("userActivityLast")
@Scope("request")
public class UserActivityLastImpl {
    private ReportsService reportsService;
    private List<Users> listUserActivityLast;

    @Autowired
    public UserActivityLastImpl(ReportsService reportsService) {
        this.reportsService = reportsService;
        setListUserActivityLast(this.reportsService.getUserActivityLastReport());
    }

    public List<Users> getListUserActivityLast() {
        return listUserActivityLast;
    }

    private void setListUserActivityLast(List<Users> listUserActivityLast) {
        this.listUserActivityLast = listUserActivityLast;
    }
}
